﻿<dialogs:DialogWindow x:Class="Mnk.TBox.Plugins.Notes.Components.Dialog"
                      xmlns:loc="clr-namespace:Mnk.TBox.Plugins.Notes.Code.Localization"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:dialogs="clr-namespace:Mnk.Library.WpfControls.Dialogs;assembly=Mnk.Library.WPFControls"
             xmlns:wpfSyntaxHighlighter="clr-namespace:Mnk.Library.WpfSyntaxHighlighter;assembly=Mnk.Library.WPFSyntaxHighlighter"
             xmlns:units="clr-namespace:Mnk.Library.WpfControls.Components.Units;assembly=Mnk.Library.WPFControls"
             mc:Ignorable="d" 
             Title="{Binding Key}" ShowActivated="True" WindowStartupLocation="CenterOwner" ShowInTaskbar="True"
             MinWidth="480" MinHeight="320"
             Width="480" Height="320" >
    <DockPanel Margin="5">
        <Button Content="Save" IsDefault="True" IsCancel="True" Margin="20 10" Click="CloseClick" DockPanel.Dock="Bottom" HorizontalAlignment="Right"/>
        <DockPanel>
            <units:ComboBoxUnit ItemsSource="{Binding Notes}" Name="NotesList" UnitType="Text" Title="{loc:Tr ConfigureNote}" DockPanel.Dock="Top" ValueCaption="{Binding SelectedNote}"/>
            <DockPanel Margin="5" DataContext="{Binding ElementName=NotesList, Path=SelectedValue }" IsEnabled="{Binding ElementName=NotesList,Path=IsSelected}" >
                <wpfSyntaxHighlighter:SyntaxHighlighter Text="{Binding Value}" />
            </DockPanel>
        </DockPanel>
    </DockPanel>
</dialogs:DialogWindow>
